﻿@if (ViewBag.IsLogOn)
{ <table border="1">
    <tr>
        <td>
            @ViewBag.IP  
        </td>
          <td>
            @ViewBag.UserID  
        </td>
        <td>
            @using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm" }))
            {
                @Html.AntiForgeryToken()
                <a href="javascript:document.getElementById('logoutForm').submit()">在线</a>
            }
        </td>
        <td>
            @Html.ActionLink("主页", "Index", "Home");
        </td>
    </tr>  
    </table>
}
else
{  <tr> 
        <td>@Html.ActionLink("登陆", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })</td>
    </tr>  
}
